package com.example.administrator.textproject;

import android.content.Context;
import android.content.Intent;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.TextureView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import java.util.List;

/**
 * Created by Administrator on 2017/3/15 0015.
 */

public class ListViewAdapter extends RecyclerView.Adapter<ListViewAdapter.MyViewHolder> {
    private LayoutInflater mInflater;

    public ListViewAdapter(Context context)
    {
        mInflater = LayoutInflater.from(context);

    }
    @Override
    public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = mInflater.inflate(R.layout.list_item,
                parent, false);
        MyViewHolder holder = new MyViewHolder(view);
        return holder;
    }

    @Override
    public void onBindViewHolder(MyViewHolder holder, int position) {
//        holder.textView.setText("哈哈");

    }

    @Override
    public int getItemCount() {
        return 10;
    }
    public static class MyViewHolder extends RecyclerView.ViewHolder
    {
        public  TextView textView;
        public MyViewHolder(View view)
        {
            super(view);
//            textView= (TextView)view.findViewById(R.id.goods_tv);

        }


    }
}
